package com.umerclass.ui.anmo.adapter;

import android.content.Context;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.umerclass.R;
import com.umerclass.bean.anmo.YeJiBean;
import com.umerclass.frame.ui.recycleview.PullLoadMoreRecyclerView;
import com.umerclass.frame.ui.recycleview.adapter.RecyclerviewBasicPageAdapterTwo;
import com.umerclass.frame.ui.recycleview.base.ViewHolder;
import com.umerclass.frame.ui.recycleview.listener.DataStateListener;
import com.umerclass.frame.ui.recycleview.listener.OptListener;

public class PerformanceAdapter extends RecyclerviewBasicPageAdapterTwo<YeJiBean> {

    private OptListener optListener;

    public PerformanceAdapter(Context context, int layoutId) {
        super(context, layoutId);
    }

    public PerformanceAdapter(Context context, int layoutId,
                              PullLoadMoreRecyclerView pullLoadMoreRecyclerView,
                              DataStateListener dataStateListener, OptListener optListener) {
        super(context, layoutId, pullLoadMoreRecyclerView, dataStateListener);
        this.optListener = optListener;
    }

    @Override
    public void convert(ViewHolder holder, YeJiBean bean, final int position) {

        LinearLayout linearLayout = holder.getView(R.id.linear);
        TextView tv_one = holder.getView(R.id.tv_name);
        TextView tv_two = holder.getView(R.id.tv_time);
        TextView tv_money = holder.getView(R.id.tv_money);
        tv_one.setText("仪器佣金: "+ bean.getDeviceNo());
        tv_two.setText(""+ bean.getCreateDate());
        tv_money.setText("+"+ bean.getPrice());
       /* linearLayout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                optListener.onOptClick(v,position);
            }
        });*/
    }
}
